import 'package:time/http/factory/entity_factory.dart';

class BasePageBean<T> {
  List<T>? records;
  int? currentPage;

  BasePageBean.fromJson(String className, json) {
    currentPage = json['currentPage'];
    records = (json['records'] != null
        ? (json['records'] as List)
            .map((value) => json[value] = EntityFactory.generateOBJ(className, value))
            .toList()
            .cast<T>()
        : null)!;
  }
}
